Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix more test_spawn_broken_pipe races #19587

Merged

Conversation

allisonkarlitskaya
Copy link
Member

On old Python versions, we can get the process-exited callback from the child watcher at the time of registration, without a return to the mainloop. That means that for very fast-exiting processes, we might never get a chance to write to them to observe a EPIPE error.

Add a synchronization point so that we can prevent the process from exiting until after we've finished spawning it (and registering the watch).

Closes #19586

On old Python versions, we can get the process-exited callback from the
child watcher at the time of registration, without a return to the
mainloop.  That means that for very fast-exiting processes, we might
never get a chance to write to them to observe a EPIPE error.

Add a synchronization point so that we can prevent the process from
exiting until after we've finished spawning it (and registering the
watch).

Closes cockpit-project#19586
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers!

@martinpitt martinpitt merged commit e1078df into cockpit-project:main Nov 8, 2023
91 checks passed
@martinpitt martinpitt deleted the plumber-plus-plus branch November 8, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_spawn_broken_pipe unit test is flaky
2 participants